package com.aabte.mybatis.bean;

public enum EmployeeStatus {

    LOGIN(100, "登陆"),
    LOGOUT(200, "登出"),
    REMOVE(300, "不存在");

    private Integer code;
    private String msg;

    EmployeeStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static EmployeeStatus getEmployeeStatus(Integer code) {
        EmployeeStatus[] values = EmployeeStatus.values();
        for (EmployeeStatus employeeStatus: values) {
            if (employeeStatus.getCode().equals(code)) {
                return employeeStatus;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
